package com.Day1009;

import java.io.*;

public class Text6 {
    public static void main(String[] args) throws Exception {
        String filePath = "F:\\Java\\c.txt";
        File file = new File(filePath);
        FileInputStream fileInputStream = new FileInputStream(file);
        InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream,"UTF-16");
        BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
        StringBuffer stringBuffer = new StringBuffer();
        String line = null;
        while ((line = bufferedReader.readLine()) != null){
            stringBuffer.append(line + "\n");
        }
        System.out.println(stringBuffer.toString());
        bufferedReader.close();
        inputStreamReader.close();
        fileInputStream.close();
    }
}
